package com.epam.training.formvalidate;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;

public class CustomerForm {

	@Size(min = 4, max = 20)
	@NotEmpty
	private String name;

	@Size(max = 40)
	@NotEmpty
	private String secondName;

	@Size(max = 40)
	@NotEmpty
	private String surname;

	@NotEmpty
	@Size(min = 4, max = 30)
	private String newPassword;

	@Size(min = 4, max = 30)
	@NotEmpty
	private String repeatPassword;

	@Size(min = 10, max = 20)
	private String driveLicense;

	@Pattern(regexp = "\\d{10}")
	@NotEmpty
	private String phone;

	@NotEmpty
	@Email
	private String email;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the secondName
	 */
	public String getSecondName() {
		return secondName;
	}

	/**
	 * @param secondName
	 *            the secondName to set
	 */
	public void setSecondName(String secondName) {
		this.secondName = secondName;
	}

	/**
	 * @return the surname
	 */
	public String getSurname() {
		return surname;
	}

	/**
	 * @param surname
	 *            the surname to set
	 */
	public void setSurname(String surname) {
		this.surname = surname;
	}

	/**
	 * @return the newPassword
	 */
	public String getNewPassword() {
		return newPassword;
	}

	/**
	 * @param newPassword
	 *            the newPassword to set
	 */
	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}

	/**
	 * @return the repeatPassword
	 */
	public String getRepeatPassword() {
		return repeatPassword;
	}

	/**
	 * @param repeatPassword
	 *            the repeatPassword to set
	 */
	public void setRepeatPassword(String repeatPassword) {
		this.repeatPassword = repeatPassword;
	}

	/**
	 * @return the driveLicense
	 */
	public String getDriveLicense() {
		return driveLicense;
	}

	/**
	 * @param driveLicense
	 *            the driveLicense to set
	 */
	public void setDriveLicense(String driveLicense) {
		this.driveLicense = driveLicense;
	}

	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}

	/**
	 * @param phone
	 *            the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

}
